package code.c02;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/9/8 10:19
 * @package PACKAGE_NAME
 * @description 打印 10 * 10 方正
 */

public class Print {
    public static void main(String[] args) {
        printMatrix(5,10,'$');
        printTiangle(4,'%');
    }

    public static void printMatrix(int x,int y,char elem){
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < y; j++) {
                System.out.print(elem + " ");
            }
            System.out.println("");
        }
    }

    public static void printTiangle(int x,char elem){
        for (int i = 0; i <= x; i++) {
            for (int j = 0; j < i; j++) {
                System.out.print(elem + " ");

            }
            System.out.println("");

        }
    }
}
